import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";
import User from "./views/User.vue";
import UserCenter from "./views/userCenter.vue";
import UserFei from "./views/userfei.vue";
import UserBang from "./views/userbang.vue";
import UserYou from "./views/useryou.vue";
import problem from "./views/problem.vue";
import Userji from "./views/userji.vue";
import kecheng from "./views/kecheng.vue";
import shouyin from "./views/shouyin.vue";
import lgou from "./views/lgou.vue";
import shike from "./views/shike.vue";
import yinke from "./views/yinke.vue";
import kecheng2 from "./views/kecheng2.vue";
import search from "./views/search.vue";
import fankui from "./views/fankui";
import message from "./views/userMessage";
Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "Home",
      component: Home,
      meta: { title: "在线教育" }
    },
    {
      path: "/search",
      name: "search",
      component: search,
      meta: { title: "搜索" }
    },
    {
      path: "/user",
      name: "User",
      component: User,
      meta: { title: "个人中心" }
    },
    {
      path: "/userCenter",
      name: "userCenter",
      component: UserCenter,
      meta: { title: "个人信息" }
    },
    {
      path: "/userji",
      name: "userji",
      component: Userji
    },
    {
      path: "/userfei",
      name: "userfei",
      component: UserFei
    },
    {
      path: "/userbang",
      name: "userbang",
      component: UserBang,
      meta: { title: "帮助中心" }
    },
    {
      path: "/useryou",
      name: "useryou",
      component: UserYou
    },
    {
      path: "/message",
      name: "userMessage",
      component: message,
      meta: { title: "我的消息" }
    },
    {
      path: "/problem",
      name: "problem",
      component: problem,
      meta: { title: "常见问题" }
    },
    {
      path: "/fankui",
      name: "fankui",
      component: fankui,
      meta: { title: "意见反馈" }
    },
    {
      path: "/kecheng/:id",
      name: "kecheng",
      props: true,
      component: kecheng,
      meta: { title: "课程详情" }
    },
    {
      path: "/kechengy/:id",
      name: "kechengy",
      props: true,
      component: kecheng2,
      meta: { title: "课程详情" }
    },
    {
      path: "/shouyin",
      name: "shouyin",
      component: shouyin
    },
    {
      path: "/lgou/:id",
      name: "lgou",
      props: true,
      component: lgou,
      meta: { title: "微信支付" }
    },
    {
      path: "/shike",
      name: "shike",
      component: shike,
      meta: { title: "视频课程" }
    },
    {
      path: "/yinke",
      name: "yinke",
      component: yinke,
      meta: { title: "音频课程" }
    }
  ]
});
